<?php
namespace app\validate;

use think\Validate;

class CheckPassword extends Validate
{
    protected $rule =   [
        'old_password'  => 'require',
        'password'  => 'require|length:15,20',
        'check_password'  => 'require|length:15,20|confirm:password',
    ];

    protected $message  =   [
        'old_password.require' => '旧密码不能为空！',
        'password.require' => '密码不能为空！',
        'password.length' => '密码15到20位',
        'check_password.require' => '确认密码不能为空！',
        'check_password.length' => '确认密码15到20位',
        'check_password.confirm' => '两次密码输入不一致',
    ];

}